<?php

    if (!class_exists('shopPage')) {
         require_once(CORE_INCLUDE_DIR.'/shopPage.php');
     }

     class shop_express_manager extends shopPage
     {
         var $noCache = true;

         function shop_express_manager()
         {
             parent::shopPage();
             $this->view_dir = dirname(__FILE__).'/view';
         }

         function expressQuery()
         {
             if ($_COOKIE["L_RANDOM_CODE"]!=md5($_GET['trackCode'])) {
                 $this->pagedata['errorMsg'] = '验证码录入错误，请重新输入';
             } else {
                 $express_no = trim($_GET['express_no']);
                 $objTrack = &$this->system->loadModel('plugins/express_manager/track');
                 $trackInfo = $objTrack->getTrackInfoByExpressId($express_no);
                 $objLogistic = &$this->system->loadModel('plugins/express_manager/logistic');
                 $logisticInfo = $objLogistic->getFieldById($express_no);
                 $logiItems = $objLogistic->getItemsByLogiId($express_no);
                 $this->pagedata['data'] = $trackInfo;
                 $this->pagedata['logistic'] = $logisticInfo;
                 $this->pagedata['logiItems'] = $logiItems;
             }
             $this->display($this->view_dir.'/shop/express_query_result.html');
         }
     }
?>